<ul id="gallery_widget" class="gallery">
    <?php foreach ($projects as $project) {?>
        <li> 
            <img src="<?php echo $project->image;?>" alt="" /> 
            <span> 
                <a href="<?php echo $project->image;?>" data-gal="prettyPhoto[gallery1]"> 
                    <img class="img_hover_gal" src="<?php echo $project->image;?>" alt="Gallery"/> 
                </a> 
            </span> 
            <span class="border_line"></span> 
        </li>
    <?php }?>
</ul>